import math

from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeWire
from OCC.Core.GC import GC_MakeArcOfCircle
from OCC.Core.gp import gp_Pnt, gp_Ax2, gp_Circ, gp_Dir

location = gp_Pnt(0, 0, 0)
axis = gp_Dir(0, 0, -1)
circleAxis = gp_Ax2(location, axis)
circle = gp_Circ(circleAxis, 5)

arcofCircle0 = GC_MakeArcOfCircle(circle, 0 / 180 * math.pi, 180 / 180 * math.pi, True)
arcofCircle1 = BRepBuilderAPI_MakeEdge(arcofCircle0.Value())
arcofCircle = BRepBuilderAPI_MakeWire(arcofCircle1.Edge())

if __name__ == "__main__":
    from OCC.Display.SimpleGui import init_display

    display, start_display, add_menu, add_function_to_menu = init_display()
    display.DisplayShape(arcofCircle.Edge(), update=True)
    start_display()
